//
// Created by zmh on 23-10-12.
//

#include <torch/torch.h>

int main() {
    const auto s = std::chrono::system_clock::now();

    torch::Tensor real = torch::rand({1, 9, 32000});
    torch::Tensor imag = torch::rand({1, 9, 32000});
    torch::Tensor complex_inputs = torch::complex(real, imag);

    torch::Tensor output = torch::istft(complex_inputs, 16, 4, 16, {}, true, false, c10::nullopt, 500 * 256);


    const auto e = std::chrono::system_clock::now();

//    std::cout << output.size(0) << " " << output.size(1) << std::endl;

    std::cout << std::chrono::duration_cast<std::chrono::milliseconds>(e - s).count() << std::endl;
}